#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2025/1/28 12:12
# @Author  : Ramsey
# @Site    : zh
# @File    : demo.py
# @Software: PyCharm

def callback():
    for _ in range(10):
        print("aaaaa")
        yield str(_)


def _fetch():
    aaa_result = callback()
    return transform_outputs(outputs=aaa_result)


def transform_outputs(outputs):
    for output in outputs:
        print("ccccc")
        yield output


def _crawl():
    bbb_results = _fetch()
    for bbb_result in bbb_results:
        print("ddddd")
        print(bbb_result)


if __name__ == "__main__":
    _crawl()